<?php
class SettingsController extends AppController {

    public $helpers = array('Form');
    private $settings_id = 1;

    public function admin_site() {
        if(!empty($this->data)) {
            if($this->Setting->save($this->data)) {
                $this->Session->setFlash(__('The Settings have been saved',true));
                $this->redirect('site',null,true);
            } else {
                $this->Session->setFlash(__('The Settings could not be saved. Please, try again.',true));
            }
        } else {
            $this->data = $this->Setting->read(null,$this->settings_id);
        }
    }

}
?>